﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IronSuit.DataMap;

namespace IronSuit.DataMap
{
	public partial class Salary : DataEntity
	{
		public Salary()
		{
		}
		public Salary(int salaryId)
		{
			this.SalaryId = salaryId;

		}
		public int SalaryId
		{
			get
			{
				return GetFieldValue("SalaryId", int.MinValue);
			}
			set
			{
				SetFieldValue("SalaryId", value);
			}
		}
		public string Province
		{
			get
			{
				return GetFieldValue("Province", "");
			}
			set
			{
				SetFieldValue("Province", value);
			}
		}
		public string City
		{
			get
			{
				return GetFieldValue("City", "");
			}
			set
			{
				SetFieldValue("City", value);
			}
		}
		public string Industry
		{
			get
			{
				return GetFieldValue("Industry", "");
			}
			set
			{
				SetFieldValue("Industry", value);
			}
		}
		public string Position
		{
			get
			{
				return GetFieldValue("Position", "");
			}
			set
			{
				SetFieldValue("Position", value);
			}
		}
		public int SalaryVal
		{
			get
			{
				return GetFieldValue("SalaryVal", int.MinValue);
			}
			set
			{
				SetFieldValue("SalaryVal", value);
			}
		}
		public string Desc
		{
			get
			{
				return GetFieldValue("Desc", "");
			}
			set
			{
				SetFieldValue("Desc", value);
			}
		}
		public string Created
		{
			get
			{
				return GetFieldValue("Created", "");
			}
			set
			{
				SetFieldValue("Created", value);
			}
		}

		[NonSerialized]
		SalaryDBHandler DBHandler;
		protected override DataHandler GetDataHandler()
		{
			if (DBHandler == null)
				DBHandler = new SalaryDBHandler(this);
			return DBHandler;
		}
	}
	public partial class SalaryDBHandler : DataHandler
	{
		internal SalaryDBHandler(Salary entity)
			: base(entity)
		{
			KeyFieldList.Add("SalaryId");

		}
		public override string TableName
		{
			get { return "salary"; }
			set
			{
			}
		}
	}
}
